package pl.edu.pjwstk.kor.web.controller;

import com.google.common.collect.Maps;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import pl.edu.pjwstk.kor.model.Customer;
import pl.edu.pjwstk.kor.model.Deal;
import pl.edu.pjwstk.kor.model.Rank;
import pl.edu.pjwstk.kor.sbql4j.project3.Project3Query;

import java.util.Collection;
import java.util.Map;

/**
 * User: pawel
 * Date: 31.12.12
 * Time: 12:27
 */
@Controller
@RequestMapping("/p3")
public class Queries3 {
	@Autowired private Project3Query p3q;

	@RequestMapping("/main.html")
	public ModelAndView main() {

		return new ModelAndView("/p3/main")
				.addObject("q1", p3q.query1())
				.addObject("q2", p3q.query2())
				.addObject("q3", p3q.query3())
				.addObject("q4", p3q.query4())
				.addObject("q5", p3q.query5())
				.addObject("q6", p3q.query6())
				;
	}
}
